﻿using System;
using System.Collections.Generic;
using System.Text;
using Young3.FMSearch.Core.Entities.GameVersions;
using Young3.FMSearch.Core.Managers;
using Young3.FMSearch.Core.Offsets;
using System.Linq;
using Young3.FMSearch.Core.Attributes;

namespace Young3.FMSearch.Core.Entities.InGame
{
    //[FMType(UseCache = false)]
    public class League : BaseObject
    {
        public League(int memoryAddress, IVersion version)
            : base(memoryAddress, version)
        { }
                public League(int memoryAddress, ArraySegment<byte> originalBytes, IVersion version)
            : base(memoryAddress, originalBytes, version)
        { }

        [FMPointer(LeagueOffsets.Nation)]
        public Country Country { get; internal set; }

        [FMPointer(LeagueOffsets.Continent)]
        public Continent Continent { get; set; }

        [FMEntityAttribute(LeagueOffsets.Reputation)]
        public Int16 Reputation { get; set; }

        [FMEntityAttribute(LeagueOffsets.Id)]
        public int ID { get; internal set; }

        [FMEntityAttribute(LeagueOffsets.Name)]
        public string Name { get; internal set; }

        public override string ToString()
        {
            return Name + " (" + Country.Name + ")";
        }
    }
}